home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_sea_ventopen.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  73 lines

  1. # Jones 3D Cog Script
  2. #
  3. # sea_ventopen.cog
  4. #
  5. # Rotating Door Script
  6. #
  7. # [DS & revised by HB]
  8. #
  9. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  10. # ==============================================================================
  11.  
  12. symbols
  13.  
  14.     message        startup
  15.     message        activate    
  16.  
  17.     # keyframe    indylift=0in_armsup_1_1.key                local
  18.     keyframe    indylift=in_light_stuff_high.key        local
  19.  
  20.     sound        indysay=inxj107.wav                local    # It's unlocked.
  21.     sound        opensnd=sea_grate_open.wav            local
  22.        thing        grate
  23.     thing        lock
  24.     surface        actiface
  25.     int            open=0                    local
  26.  
  27.     thing        player                        local
  28.  
  29. end
  30.  
  31. # ==============================================================================
  32.  
  33. code
  34.  
  35. # ..............................................................................
  36.  
  37. startup:
  38.  
  39.     player = GetLocalPlayerThing();
  40.     return;
  41.  
  42. # ..............................................................................
  43.  
  44. activate:
  45.  
  46.     if (GetSenderRef() != actiface)
  47.     {
  48.         return;
  49.     }
  50.     if (open == 1)
  51.     {
  52.         return;
  53.     }
  54.     open = 1;
  55.     SetActorFlags(player, 0x200000); # no control
  56.     StartCutscene(0);
  57.     StopThing(player);
  58.     PlayVoice(player, indysay, 1.0, 1);
  59.     # PlayMode(player, 60, 0);
  60.     # sleep(0.5);
  61.     PlayKey(player, indylift, 4, 0x12, 0);
  62.     Sleep(0.5);
  63.     DestroyThing(lock);
  64.     PlaySoundThing(opensnd, grate, 1, 5, 10, 0);
  65.     Rotate(grate, -90, 2, 1);
  66.     WaitForStop(grate);
  67.     EndCutscene();
  68.     ClearActorFlags(player, 0x200000);
  69.     return;
  70.  
  71. end
  72.  
  73.